gdk: update csw event mask filter to handle smooth scroll
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 23 Jan 2012 23:28:25 +0000 (00:28 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 1 Mar 2012 21:28:57 +0000 (16:28 -0500)
Events of type GDK_SCROLL will be received if the client side window
event mask has either GDK_SCROLL_MASK or GDK_SMOOTH_SCROLL_MASK.

GDK_BUTTON_PRESS_MASK has been removed from type_masks[GDK_SCROLL]
as that bit is often set for other-than-scrolling purposes, and
yet have the window receive scroll events. In GTK+, this forces
non-smooth events bubbling, even if the widgets above want smooth
events, and legitimately set GDK_[SMOOTH_]SCROLL_MASK.

gdk/gdkwindow.c

index e1a49154209915ef97e4e05a885d74e608a30702..7ddf5c45bdfb0bb9c7ec8e85cacc979a46d8d2a3 100644 (file)
@@ -8116,7 +8116,7 @@ static const guint type_masks[] = {
   GDK_ALL_EVENTS_MASK, /* GDK_CLIENT_EVENT            = 28 */
   GDK_VISIBILITY_NOTIFY_MASK, /* GDK_VISIBILITY_NOTIFY = 29 */
   GDK_EXPOSURE_MASK, /* GDK_NO_EXPOSE                  = 30 */
-  GDK_SCROLL_MASK | GDK_BUTTON_PRESS_MASK,/* GDK_SCROLL= 31 */
+  GDK_SCROLL_MASK | GDK_SMOOTH_SCROLL_MASK,/* GDK_SCROLL= 31 */
   0, /* GDK_WINDOW_STATE = 32 */
   0, /* GDK_SETTING = 33 */
   0, /* GDK_OWNER_CHANGE = 34 */